Copying and pasting steps between documents

Each open document has its own history of steps. You can copy steps from one document and paste them into another.

To reuse steps from one document in another document:

1 Start from the document containing the steps you want to reuse.
2 Select the steps in the History palette.
3 Click the History palette's Copy Steps button to copy those steps.
4 Open the other document.
5 Place the insertion point where you want it, or select an object to apply the steps to.
6 Choose Edit > Paste to paste the steps.
The steps are played back as they're pasted into the document's History palette. The History palette shows them as only one step, called Paste Steps.

Note: Copy Steps is a different command from Copy. You can't use the Edit menu's Copy command to copy steps, though you do use Edit > Paste to paste them.

Closing a document clears its history. If you will want to use steps from a document after that document is closed, copy the steps with Copy Steps (or save them as a command; see Creating new commands from history steps) before you close the document.

Be careful when copying steps that include a Copy or a Paste command:

Don't use Copy Steps if one of the steps is a Copy command; attempting to Paste such steps may not behave as you expect.
You can't paste steps that include a Paste command but don't include a preceding Copy command.

If you paste steps into a text editor or into the HTML Source inspector, they appear as JavaScript code. This can be useful for learning to write your own scripts. For more information on using JavaScript in Dreamweaver, see Extending Dreamweaver: Basics.